/*
 * @Author: KKKKKK
 * @Date: 2021-01-10 12:08:06
 * @LastEditors: KKKKKK
 * @LastEditTime: 2021-01-10 12:08:06
 */
import axios from './config'
import url from './url'
const baseUrl = process.env.VUE_APP_BASE_URL


/* 收藏信息类 */
// 新增收藏信息类
const collectionInfoCreate = (params) => axios.post(baseUrl + url.collectionInfo.create, params)

// 删除收藏信息类
const collectionInfoDelete = (id) => axios.delete(baseUrl + url.collectionInfo.delete + `/${id}`)

// 修改收藏信息类
const collectionInfoUpdate = (params, id) => axios.post(baseUrl + url.collectionInfo.update + `/${id}`, params)

// 获取某个收藏信息类
const collectionInfoLoad = (id) => axios.get(baseUrl + url.collectionInfo.load + `/${id}`)

// 获取收藏信息类列表
const collectionInfoPage = (params) => axios.get(baseUrl + url.collectionInfo.page, { params })

export default {
    collectionInfoCreate,
    collectionInfoDelete,
    collectionInfoUpdate,
    collectionInfoLoad,
    collectionInfoPage
}